class Breed < ActiveRecord::Base
  def self.search(search, page)
    unless search
      Breed.paginate :per_page => 10, :page => page
    else
      Breed.paginate :per_page => 10, :page => page,
      :conditions => ['Breeds.breed_name like ?', "%#{search}%"]
    end
  end
end
